@extends('layouts.app')
@section('title','预约须知')
@section('content')

<div class="row-fluid">
	<div class="box span12">
		<div class="box-header">
			<h2>预约须知</h2>
		</div>
		<div class="box-content">
		@if($notice == null)
			<form action="" method="POST" class="form-horizontal" />
			{{ csrf_field() }}
			  <fieldset>
				<div class="control-group">
				  <label class="control-label" for="date01">开始时间</label>
				  <div class="controls">
					<input type="text" class="input-xlarge datepicker" name='starttime' id="date01" value="<?php echo date('m/d/Y'); ?>" />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">截止时间</label>
				  <div class="controls">
					<input type="text" class="input-xlarge datepicker" name='stoptime' id="date02" value="<?php echo date('m/d/Y'); ?>" />
				  </div>
				</div>

				<div class="control-group">
				  <label class="control-label" for="fileInput">预约信息</label>
				  <div class="controls">
						<textarea style='width:500px;height:120px;resize:none;' name='yuyue'></textarea>
				  </div>
				</div>          
				<div class="control-group hidden-phone">
				  <label class="control-label" for="textarea2">规则提醒</label>
				  <div class="controls">
					<textarea style='width:500px;height:120px;resize:none;' name='tixing'></textarea>
				  </div>
				</div>
				<div class="control-group hidden-phone">
				  <label class="control-label" for="textarea2">温馨提示</label>
				  <div class="controls">
					<textarea style='width:500px;height:120px;resize:none;' name='tishi'></textarea>
				  </div>
				</div>

				<div class="form-actions">
				  <button type="submit" class="btn btn-primary">确定</button>
				  <button type="reset" class="btn">取消</button>
				</div>
			  </fieldset>
			</form>   
		@else
			<form action="{{ URL('app/notice',$notice->id) }}" method="POST"  class="form-horizontal" />
			{{ csrf_field() }}
			{{ method_field('PUT') }}
			  <fieldset>
				<div class="control-group">
				  <label class="control-label" for="date01">开始时间</label>
				  <div class="controls">
					<input type="text" class="input-xlarge datepicker" name='starttime' id="date01" value="{{ $notice->starttime }}" />
				  </div>
				</div>
				<div class="control-group">
				  <label class="control-label" for="date01">截止时间</label>
				  <div class="controls">
					<input type="text" class="input-xlarge datepicker" name='stoptime' id="date02" value="{{ $notice->stoptime }}" />
				  </div>
				</div>

				<div class="control-group">
				  <label class="control-label" for="fileInput">预约信息</label>
				  <div class="controls">
						<textarea style='width:500px;height:120px;resize:none;' name='yuyue'>{{ $notice->yuyue }}</textarea>
				  </div>
				</div>          
				<div class="control-group hidden-phone">
				  <label class="control-label" for="textarea2">规则提醒</label>
				  <div class="controls">
					<textarea style='width:500px;height:120px;resize:none;' name='tixing'>{{ $notice->tixing }}</textarea>
				  </div>
				</div>
				<div class="control-group hidden-phone">
				  <label class="control-label" for="textarea2">温馨提示</label>
				  <div class="controls">
					<textarea style='width:500px;height:120px;resize:none;' name='tishi'>{{ $notice->tishi }}</textarea>
				  </div>
				</div>

				<div class="form-actions">
				  <button type="submit" class="btn btn-primary">更新</button>
				  <button type="reset" class="btn">取消</button>
				</div>
			  </fieldset>
			</form>   
		@endif
		</div>
	</div><!--/span-->

</div><!--/row-->
@stop
